<?php

namespace App\Service\Index\v1_3_0;

use App\Helpers\AliyunUtil;
use App\Model\UserProfile;
use App\Service\BaseService;

/**
 * 活动入口信息
 */
class ActExtranceService extends BaseService
{
    public function handle()
    {
        $userId = $this->getUserId();
        $ret = [
            // [
            //     'act_name' => '许愿树',
            //     'act_icon' => AliyunUtil::IMG_HOST_V2 . 'act/wishtree.png',
            //     'action' => 'wish_tree',
            //     'jump_link' => ''
            // ]
        ];
        $profile = UserProfile::getProfile($userId);
        if ($profile->gender == 1) {
            $ret[] = [
                'act_name' => '天天福利',
                'act_icon' => AliyunUtil::IMG_HOST_V2 . 'act/daily_gift.png',
                'action' => 'daily_gift',
                'jump_link' => ''
            ];
        }
        return $ret;
    }
}
